package com.jianglin.lastsmalldemo.vo;

import lombok.Data;

@Data
public class R {
    private int code;
    private String msg;
    private Object data;
    public static R ok(Object data) {
        R r = new R();
        r.setCode(0);
        r.setData(data);
        r.setMsg("success");
        return r;
    }
    public static R error(String msg) {
        R r = new R();
        r.setCode(1);
        r.setMsg(msg);
        return r;
    }
}
